<?php
$this->pageTitle=Yii::app()->name;
// for the right barnner
$this->menu=array(array('label'=>'Post  Category', 'url'=>array('/admin/post')));
$sql = "select * from `post` order by `created_at` desc";
$allPost = yii::app()->db->createCommand($sql)->queryAll();
?>
<div class="post">
    <table>
    <?php if($allPost) {
        foreach($allPost as $postItem) {
        ?>
        <tr>
            <td><?php echo $postItem['title'] ?></td>
        </tr>
         <tr>
             <td><?php echo $postItem['created_at']; ?></td>
         </tr>
         <tr>
             <td><pre><?php echo $postItem['post']?></pre></td>
         </tr>
          <tr>
              <td class="seperate_line"></td>
          </tr>
    <?php
        }
    }
    ?>
    </table>
</div>
